package com.itheima.Cookie.Utils;

import javax.servlet.http.Cookie;

public class CookieUtils {
    /*
        根据名称获取指定的cookie
     */

    public static Cookie findCookieByName(Cookie[] cookies,String CookieName){
        if (cookies != null){
            for (Cookie cookie : cookies) {
                if ("lastTimeCookie".equals(cookie.getName())){
                    return cookie;

                }
            }
        }
        return null;
    }
}
